package com.wu.service;

import com.wu.pojo.ArticleDraft;

import java.util.Map;

/**
 * @author: 吴磊
 * @program: blog
 * @create: 2021-05-09 08:53
 */
public interface ArticleDraftService {
    /**
     * 插入
     *
     * @param articleTitle
     * @param articleContent
     * @return
     */
    ArticleDraft insertArticleDraft(String articleTitle, String articleContent);


    /**
     * 根据用户Id获取草稿
     *
     * @return
     */
    Map<String, Object> getArticleDraftListByUserId();

    /**
     * 通过草稿Id删除草稿
     *
     * @param articleId
     * @return
     */
    void deleteArticleDraftByArticleId(String articleId);

    /**
     * 更新
     *
     * @param articleId
     * @param articleTitle
     * @param articleContent
     * @return
     */
    ArticleDraft updateArticleDraft(String articleId, String articleTitle, String articleContent);


    /**
     * 根据草稿Id获取草稿
     *
     * @param articleId
     * @return
     */
    Map<String, Object> getArticleDraftByArticleId(String articleId);
}
